import java.util.Scanner;
//递归求n的阶层
public class DG5jc {
    public static int DG(int n) {
        if(n == 1) return 1;
        return n * DG(n - 1);
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(DG5jc.DG(n));
    }
}
